package com.novax.ex.activity.open.api.inner;

import com.novax.ex.activity.open.model.request.task.TaskRewardRequest;
import com.novax.ex.activity.open.model.response.task.TaskRewardInnerResponse;
import com.novax.ex.common.results.ReturnResult;
import com.novax.ex.common.util.PageQuery;
import com.novax.ex.common.util.PageUtil;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

import jakarta.validation.Valid;
import java.util.List;

/**
 * Description: 后台-任务奖励配置
 *
 * @author shaw
 * @date 2023/6/19 15:03
 */
@Tag(name = "后台 新手引导任务奖励配置", description = "后台 新手引导任务奖励配置")
@FeignClient(url = "${remote.activity-service.endpoint}", name = "TaskRewardApi", contextId = "TaskRewardApi")
public interface TaskRewardApi {

    @Operation(summary = "任务奖励查询")
    @GetMapping(value = "/v3/private/task/rewards")
    ReturnResult<PageUtil<TaskRewardInnerResponse>> query(PageQuery pageQuery);

    @Operation(summary = "任务奖励编辑")
    @PostMapping(value = "/v3/private/task/rewards/{id}")
    ReturnResult<?> modify(@RequestHeader("language") String language,
                           @PathVariable Long id,
                           @Valid @RequestBody TaskRewardRequest taskRewardRequest,
                           BindingResult bindingResult);
}
